This paper presents an integrated computer-vision system for monitoring personal protective equipment (PPE) compliance and selected sanitation hazards in video streams. The system combines a fine-tuned YOLOv9-e detector with worker tracking, geometric PPE-to-person association, temporal evidence filtering, and persistent alert management. Two detection configurations are evaluated. The six-class configuration is derived from SH17 and contains person, helmet, vest, gloves, glasses, and shoes. The extended twelve-class configuration adds hairnet, apron, mask, rat, cockroach, and lizard using the Roboflow Universe Safety Food dataset. On the six-class validation set, YOLOv9-e records 75.94% precision, 64.25% recall, 69.34% mAP@0.5, and 47.04% mAP@0.5:0.95. A separate post-training evaluation reports 69.20% and 47.00% for the two mAP measures, respectively. The twelve-class validation run reports 84.89% precision, 76.45% recall, 81.15% mAP@0.5, and 54.36% mAP@0.5:0.95. These configurations use different class sets and data distributions and are therefore not treated as a controlled model comparison. The system further uses ByteTrack, anatomical spatial heuristics, a time-calibrated exponential moving average with hysteresis, and a three-second alert persistence rule. A detector-stage timing measurement of 29.67 ms, equivalent to approximately 33.7 frames per second, is reported; it excludes the complete video-to-dashboard pipeline. Evaluation was conducted on a local workstation using validation data and pre-recorded video, with no edge-device or multi-camera field validation.
Introduction
The text presents an AI-based Workplace Safety Monitoring System that uses YOLOv9-e object detection and ByteTrack tracking to monitor workers' Personal Protective Equipment (PPE) and identify workplace safety violations in real time.
Traditional workplace safety inspections are often manual and periodic, while basic camera-based detection systems may generate inaccurate alerts due to worker movement, object occlusion, poor visibility and temporary detection failures. The proposed system addresses these challenges by combining object detection, worker tracking, PPE association and temporal alert filtering.
The system has the following key features:
PPE Detection: Uses the YOLOv9-e deep learning model to identify safety equipment such as helmets, safety vests, gloves, glasses and shoes.
Worker Tracking: Integrates ByteTrack to track individual workers across video frames and maintain their identities.
PPE Association: Uses geometric calculations and worker-relative coordinates to associate detected safety equipment with the correct worker.
Worker Detection Recovery: Recovers missing person bounding boxes using detected helmets or safety vests.
Crop-Based Refinement: Performs additional detection on head and torso regions to improve the identification of small or partially hidden PPE objects.
Temporal Alert Filtering: Uses Exponential Moving Average (EMA), hysteresis and alert persistence to reduce false alarms caused by temporary detection failures.
Multiple Object Detection: Supports a twelve-class configuration that includes industrial PPE items, food-hygiene equipment and selected pests such as rats, cockroaches and lizards.
Web-Based Monitoring: Provides a React dashboard with live monitoring, testing, analytics and system health information.
The system follows a modular architecture consisting of video input, YOLOv9-e detection, worker recovery, ByteTrack tracking, spatial PPE association, temporal compliance monitoring and alert generation.
The implementation uses:
YOLOv9-e and PyTorch: Object detection and model training.
ByteTrack: Worker tracking across video frames.
OpenCV: Video processing and frame extraction.
FastAPI: Backend services and REST APIs.
React: Interactive monitoring dashboard.
PostgreSQL: Storage of worker records, detections, camera details and alerts.
WebSockets: Real-time communication between the backend and dashboard.
The project uses the SH17 benchmark dataset and an extended Safety Food dataset. It evaluates six-class and twelve-class configurations, with different training durations and dataset distributions.
Conclusion
This paper described an integrated YOLOv9-e-based platform for PPE compliance and selected sanitation-hazard monitoring. The system combines object detection with worker tracking, anatomical spatial association, worker-box recovery, crop-based refinement, temporal EMA evidence filtering, hysteresis, and persistent alert management. The six-class SH17 configuration achieved 69.34% mAP@0.5 in its final logged validation epoch, while the extended twelve-class configuration achieved 81.15% mAP@0.5 on its own validation set. These figures characterize different configurations and are not a controlled comparison. The measured 29.67 ms latency applies to the detector stage only. The implementation provides a foundation for worker-level safety monitoring, but further video-level, multi-camera, edge-device, and licensing validation is necessary before claims of field readiness or commercial deployment can be made.
References
[1] N. D. Nath, A. H. Behzadan, and S. G. Paal, “Deep learning for site safety: Real-time detection of personal protective equipment,” Automation in Construction, vol. 112, Art. no. 103085, 2020, doi: 10.1016/j.autcon.2020.103085.
[2] H. M. Ahmad and A. Rahimi, “SH17: A dataset for human safety and personal protective equipment detection in manufacturing industry,” Journal of Safety Science and Resilience, vol. 6, no. 2, pp. 175–185, Jun. 2025, doi: 10.1016/j.jnlssr.2024.09.002.
[3] C.-Y. Wang, I.-H. Yeh, and H.-Y. M. Liao, “YOLOv9: Learning what you want to learn using programmable gradient information,” in Computer Vision – ECCV 2024, Lecture Notes in Computer Science, vol. 15089, 2024.
[4] Y. Zhang et al., “ByteTrack: Multi-object tracking by associating every detection box,” in Computer Vision – ECCV 2022, Lecture Notes in Computer Science, vol. 13682, 2022, doi: 10.1007/978-3-031-20047-2_1.
[5] [5] Safety Food System, “Safety Food,” Roboflow Universe, Dataset Version 3, Sep. 4, 2024. [Online]. Available: https://universe.roboflow.com/safety-food-system/safety-food/dataset/3. License: CC BY 4.0.
[6] [6] Occupational Safety and Health Administration, “Personal protective equipment,” 29 CFR § 1910.132, U.S. Department of Labor.